-- GENERATED SPELL FOR [Unliving Mossflayer] --


function spell0_11291(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(11428,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11291', 2335, 1)
end

function spell1_11291(pUnit, Event) --@Wither Touch,n/a--
pUnit:FullCastSpellOnTarget(4974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11291', 629, 1)
end

function Sorts_11291(pUnit, Event)
local choix_sorts_11291 = math.random(0, 1)
if choix_sorts_11291 == 0 then
pUnit:RegisterEvent('spell0_11291', 1, 1)
end
if choix_sorts_11291 == 1 then
pUnit:RegisterEvent('spell1_11291', 1, 1)
end
end

function mob11291_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11291', math.random(1500, 3000), 1)
end

function mob11291_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11291_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11291_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11291, 1, 'mob11291_Action')
RegisterUnitEvent(11291, 2, 'mob11291_Leave')
RegisterUnitEvent(11291, 3, 'mob11291_Kill')
RegisterUnitEvent(11291, 4, 'mob11291_Die')
